EPYDOC=epydoc
DOC_HTML_DIR=../html

DOC_MODULES=bank \
	datamanager \
	db \
	rawdb \
	set \
	synchronized \
	transactionmanager


DIR_MODULES=passivereplication

GLOBAL_DOC_MODULES=__builtin__ \
	threading \
	time \
	sys \
	cPickle \
	socket \
	SocketServer \
	struct \
	code \
	readline \
	Queue


.PHONY: clean html-doc

CLEAN_PATTERNS=*~ *.pyc *.pyo semantic.cache
clean:
	@for dir in . $(DIR_MODULES); do \
		for pat in $(CLEAN_PATTERNS); do \
	  		rm -f $$dir/$$pat; \
		done; \
	done

html-doc: $(DOC_MODULES:=.py) $(DIR_MODULES)
# 	epydoc --html -o $(DOC_HTML_DIR) \
# 		 $(DOC_MODULES) \
# 		 $(DIR_MODULES) \
# 		 $(GLOBAL_DOC_MODULES)
# 	epydoc --check $(DOC_MODULES) $(DIR_MODULES)
	$(EPYDOC) --html -o $(DOC_HTML_DIR) \
		. $(GLOBAL_DOC_MODULES)
	$(EPYDOC) --check .